﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Othello_Game
{
    /*
     * The Action class is used to describe an action taken on the board
     * The action has 3 important fields which define it:
     * direction: a 2 dimentional vector stating the direction in which the action effects the board (for example (1,1) means up and right (45 degrees)).
     * amount: the amount of board buttons to be flipped
     * position: the effect's starting point is on the board, at the position "row,col" 
     * */

    public class Action
    {
        #region data members
        /// <summary>
        /// The direction of the action taken
        /// </summary>
        public Direction Direction { get; private set; }
        /// <summary>
        /// The ammount of board buttons to flip
        /// </summary>
        public int Ammount { get; private set; }
        /// <summary>
        /// The position where the action start from
        /// </summary>
        public Position Position { get; private set; }

        #endregion

        /// <summary>
        /// Initializes a new instance of the Action class.
        /// </summary> 
        /// <param name="direction">The direction of the action taken</param>
        /// <param name="ammount">The ammount of board buttons to flip</param>
        /// <param name="row">The position's row value</param>
        /// <param name="col">The position's column value</param>
        public Action(Direction direction, int ammount, int row, int col)
        {
            this.Direction = direction;
            this.Ammount = ammount;
            this.Position = new Position(row, col);
        }
    }
}
